/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;


/**
 *
 * @author SONY
 */
public class CategoryService {
    
    CategoryDAO categoryDAO;
    
    public CategoryService() {
        categoryDAO = new CategoryDAO();
    }
    
    public ArrayList<Category> getCategories() {
        ArrayList<Category> categories = new ArrayList<Category>();
        try {
            categories = categoryDAO.getAllCategories();
        } catch(Exception e) {
            System.err.println(e);
        }
        return categories;
    }
    
}
